package to3;

import java.awt.Dimension;
import java.awt.Toolkit;

public class VoorraadSubMenu extends javax.swing.JFrame {
    public VoorraadSubMenu() {
        initComponents();
        setVisible(true);
        
                ////////SCHERM IN MIDDEN////////
        Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
        Dimension windowSize = this.getSize();

        int windowX = Math.max(0, (screenSize.width  - windowSize.width ) / 2);
        int windowY = Math.max(0, (screenSize.height - windowSize.height) / 2);

        this.setLocation(windowX, windowY);
        ///////////////////////////////
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        jButton4 = new javax.swing.JButton();
        artikelBestellenJB = new javax.swing.JButton();
        brandstofBestellenJB = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N
        jLabel1.setText("Voorraad beheer");

        jButton4.setText("Hoofdmenu");
        jButton4.setPreferredSize(new java.awt.Dimension(164, 46));
        jButton4.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton4ActionPerformed(evt);
            }
        });

        artikelBestellenJB.setText("Artikelen Bestellen");
        artikelBestellenJB.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        artikelBestellenJB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                artikelBestellenJBActionPerformed(evt);
                artikelBestellenJBparkerenMenu(evt);
            }
        });

        brandstofBestellenJB.setText("Brandstof Bestellen");
        brandstofBestellenJB.setCursor(new java.awt.Cursor(java.awt.Cursor.HAND_CURSOR));
        brandstofBestellenJB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                brandstofBestellenJBActionPerformed(evt);
                brandstofBestellenJBparkerenMenu(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
            .addGroup(layout.createSequentialGroup()
                .addGap(284, 284, 284)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jLabel1)
                    .addComponent(brandstofBestellenJB, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(artikelBestellenJB, javax.swing.GroupLayout.PREFERRED_SIZE, 207, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addGap(0, 309, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jLabel1)
                .addGap(109, 109, 109)
                .addComponent(artikelBestellenJB, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(50, 50, 50)
                .addComponent(brandstofBestellenJB, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 193, Short.MAX_VALUE)
                .addComponent(jButton4, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed
        hoofdMenu hM = new hoofdMenu();         this.dispose();     }//GEN-LAST:event_jButton4ActionPerformed

    private void artikelBestellenJBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_artikelBestellenJBActionPerformed
        ArtikelBestellenFrame artikelBestellenFrame = new ArtikelBestellenFrame();
        this.dispose();
    }//GEN-LAST:event_artikelBestellenJBActionPerformed

    private void artikelBestellenJBparkerenMenu(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_artikelBestellenJBparkerenMenu

   }//GEN-LAST:event_artikelBestellenJBparkerenMenu

    private void brandstofBestellenJBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_brandstofBestellenJBActionPerformed
        BrandstofBestellenFrame brandsofBestellenFrame = new BrandstofBestellenFrame();
        this.dispose();
    }//GEN-LAST:event_brandstofBestellenJBActionPerformed

    private void brandstofBestellenJBparkerenMenu(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_brandstofBestellenJBparkerenMenu
        // TODO add your handling code here:
    }//GEN-LAST:event_brandstofBestellenJBparkerenMenu

    public static void main(String args[]) {
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VoorraadSubMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VoorraadSubMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VoorraadSubMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VoorraadSubMenu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new VoorraadSubMenu ().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton artikelBestellenJB;
    private javax.swing.JButton brandstofBestellenJB;
    private javax.swing.JButton jButton4;
    private javax.swing.JLabel jLabel1;
    // End of variables declaration//GEN-END:variables
}
